package com.hujiang.basic.search.model;

import com.hujiang.basic.framework.rest.model.DataResult;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.UUID;

@Data
@EqualsAndHashCode(callSuper = true)
public class HJResponse extends DataResult<Object> {


    public static HJResponse ok(Object data) {
        HJResponse result = new HJResponse();
        result.setStatus(0);
        result.setMessage("success");
        result.setData(data);
        return result;
    }

    public static HJResponse fail(String message) {
        HJResponse result = new HJResponse();
        result.setStatus(-1);
        result.setMessage(message);
        return result;
    }
}
